<?php
	
	header('Content-type: text/html; charset=utf-8');
	if(!isset($_SESSION)){
		session_start();
	}

	$pdo = null;
	try {
	    $pdo = new PDO('sqlite:mydb1.db');
	    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
	} catch (PDOException $e) {
	    die("连接失败: " . $e->getMessage());
	}


	if(isset($_GET['aaa'])){
		$t1 = $_GET['aaa'];
		echo $t1;
		return;
	}

	if(isset($_GET['getTuiJ'])){
		$arr1 = array();
		foreach($pdo->query('SELECT * FROM bokeWen ORDER BY id DESC LIMIT 4') as $row){
			array_push($arr1,$row);
		} 
		echo json_encode($arr1);
		return;
	}
	


?>